<?php

declare(strict_types=1);

namespace App\Common\Model\System;

use Zms\Basics\BasicsModel;
use Zms\HyperfCasts\StPointCasts;

/**
 * @property int $id ID
 * @property int $pid 上级
 * @property string $shortname 简称
 * @property string $name 名称
 * @property int $level 层级 0 1 2 省市区县
 * @property string $pinyin 拼音
 * @property string $code 区号
 * @property string $zip 邮编
 * @property string $first 首字母
 * @property int $is_hot 热门
 * @property array $point 坐标
 */
class RegionModel extends BasicsModel
{
    public bool $timestamps = false;

    /**
     * The table associated with the model.
     */
    protected ?string $table = 'system_region';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = [];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = [
        'id' => 'int',
        'pid' => 'int',
        'level' => 'int',
        'is_hot' => 'int',
        'point' => StPointCasts::class
    ];
}